import {get, post, postExcel} from "./axios"

// 图片上传
const uploadImage = async function(data) {
    const url = `/activity/visitor/uploadimage`
    return await post(url, data)
}

// 商户列表
const getMerchList = async function(data) {
    const url = `/admin/merch/list`
    return await get(url, data)
}

// 门店列表
const getStoreList = async function(data) {
    const url = `/admin/store/list`
    return await post(url, data)
}

// 后台用户列表
const getAdminList = async function(data) {
    const url = `/admin/adminuser/list`
    return await post(url, data)
}

// 采购列表导出
const exportProcurementList = async function(data) {
    const url = `/admin/giftBill/procurementList`
    return await postExcel(url, data)
}

// 库单流水导出
const exportGiftBill = async function(data) {
    const url = `/admin/giftBill/logs`
    return await postExcel(url, data)
}

// 仪表盘的明细导出
const giftBillGiftExoprt = async function(data) {
    const url = `/admin/giftBill/gift`
    return await postExcel(url, data)
}

// 仪表盘的明细导出
const goodsExport = async function(data) {
    const url = `/admin/giftBill/giftsList`
    return await postExcel(url, data)
}

export {
    uploadImage,
    getMerchList,
    getStoreList,
    getAdminList,
    exportGiftBill,
    exportProcurementList,
    giftBillGiftExoprt,
    goodsExport
}
